//
//  GlobalDefine.h
//  Patient
//
//  Created by cokecigar on 16/3/3.
//  Copyright © 2016年 Boundary Technology. All rights reserved.
//

#ifndef GlobalDefine_h
#define GlobalDefine_h
#import "UIColor+Extend.h"
#ifdef __OBJC__


#define KScreenW  [UIScreen mainScreen].bounds.size.width
#define KScreenH  [UIScreen mainScreen].bounds.size.height

#define INTERNATIONAL(key) NSLocalizedString(key,"")

#define isPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
#define scale(length) isPad ? (length)*(KScreenW / 320 ) * 2/3:(length)*(KScreenW / 320 )

#define Font(x) [UIFont systemFontOfSize:(x)]

/*========Color BEGIN *======*/
#define ECG_RGBCOLORA(R,G,B,A) [UIColor colorWithRed:(R)/255.0 green:(G)/255.0 blue:(B)/255.0 alpha:(A)]
#define ECG_RGBCOLOR(R,G,B) ECG_RGBCOLORA(R,G,B,1)

#define ECG_COLOR_WHITE ECG_RGBCOLOR(0xff,0xff,0xff)
#define ECG_COLOR_GREEN ECG_RGBCOLOR(0x1d, 0xc5, 0x70)

//table背景色
#define ECG_COLOR_BACKGROUND ECG_RGBCOLOR(0XEF,0XEF,0XF4)


//BGCOLOR
#define COLOR_PALETTE_LIGHT_GREEN rgb(55,181,96)
#define COLOR_PALETTE_DARK_GRAY  rgb(133,133,133)

#define ECG_COLOR_BLUE ECG_RGBCOLOR(0X27,0XCF,0XDF)
#define ECG_COLOR_ORANGE ECG_RGBCOLOR(0Xfc,0Xb7,0X10)

//黄色
#define ECG_COLOR_YELLOW ECG_RGBCOLOR(0xff,0xe3,0xa8)

//红色
#define ECG_COLOR_RED ECG_RGBCOLOR(0xFA,0x4B,0x1E)

#define COLOR_BLACK_LIGHT ECG_RGBCOLOR(0x28,0x28,0x28)
#define COLOR_GREY_A8A8A8 ECG_RGBCOLOR(0xa8,0xa8,0xa8)
#define COLOR_GREY_E6E6E6 ECG_RGBCOLOR(0xe6,0xe6,0xe6)
#define COLOR_BLACK_6F6F6F ECG_RGBCOLOR(0x6f,0x6f,0x6f)
#define COLOR_BLACK_252525 ECG_RGBCOLOR(0x25,0x25,0x25)
#define COLOR_BLACK_707070 ECG_RGBCOLOR(0x70,0x70,0x70)
#define COLOR_GREEN_163C29 ECG_RGBCOLOR(0x16,0x3c,0x29)

//心电图背景grid 线颜色
#define COLOR_ECG_GRID_LINE ECG_RGBCOLOR(0xd1, 0Xd1, 0XD1)
/*========Color END *======*/

//导航条
#define NAVIGATION_BAR_BG_COLOR ECG_COLOR_GREEN

#define NAVIGATION_BAR_TITLE_COLOR [UIColor whiteColor]

#define NAVIGATION_BAR_BUTTON_COLOR [UIColor whiteColor]

#define kColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1]


// 字体大小
#define IOS_TEXT_SIZE (15)
#define IOS_TEXT_SIZE_LITTLE (13)
#define IOS_TEXT_SIZE_TITLE (17)
#define IOS_TEXT_SIZE_DESCRIPTION (15)
#define IOS_TEXT_SIZE_14 (14)
#define IOS_TEXT_SIZE_15 (15)

#define IPAD_TEXT_SIZE 15
#define IPAD_TEXT_SIZE_LITTLE 13
#define IPAD_TEXT_SIZE_TITLE 17
#define IPAD_TEXT_SIZE_DESCRIPTION 15
// 字体
#define FONT_LABEL_SIZE(s) [UIFont fontWithName:@"HelveticaNeue" size:(s)]
#define FONT_LABEL ((isPad) ? FONT_LABEL_SIZE(IPAD_TEXT_SIZE) : FONT_LABEL_SIZE(IOS_TEXT_SIZE_14))
#define FONT_BASIC ((isPad) ? FONT_LABEL_SIZE(IPAD_TEXT_SIZE) : FONT_LABEL_SIZE(IOS_TEXT_SIZE_15))
#define FONT_BUTTON_SIZE(s) [UIFont fontWithName:@"HelveticaNeue-Bold" size:(s)]
#define FONT_BUTTON ((isPad) ? FONT_BUTTON_SIZE(IPAD_TEXT_SIZE_TITLE): FONT_BUTTON_SIZE(IOS_TEXT_SIZE_TITLE))

typedef NS_ENUM(NSInteger,DetectType) {
    DetectTypeFingers30s = 30,   //双指30秒
    DetectTypeFingers40s = 40,   //双指30秒
    DetectTypeFingers1m = 60,    //双指1分
    DetectTypeFingers2m = 120,    //双指2分
    DetectTypeFingers4m = 240,    //双指4分
    DetectTypeFingersDL = NSIntegerMax,    //双指导联检测(保留，此版本不需要)
};
typedef NS_ENUM(NSInteger,ResultType) {
    ResultTypeNormal = 0,// 正常
    ResultTypeAlert,//警告
    ResultTypeStress, // 压力
    ResultTypeSerously,//严肃提示
};
#endif //__OBJC__
#endif /* GlobalDefine_h */
